import React, {Component} from 'react';
import {Text, View} from 'react-native';

/**
 * DES: 测试自定义Component
 */
class GreetingView extends Component {
    render() {
        return (
            <View style={{alignItems: 'center', marginTop: 50}}>
                <Text>Hello {this.props.name}!</Text>
            </View>
        );
    }
}

let a = 20;

function getA() {
    return a;
}

/** DES: 需要通过export暴露类给外部使用*/
export default class TestCustomerView extends Component {
    render() {
        return (
            <View style={{alignItems: 'center'}}>
                <GreetingView name="Rayman"/>
                <GreetingView name="Monki"/>
                <GreetingView name="Hello Rayman and Monki"/>
            </View>
        );
    }
}
